<% content_for :css do %>
  <%= stylesheet_link_tag 'groups_new_or_edit' %>
<% end %>
<% content_for :title do %>修改『<%= @group.name %>』的基本资料<% end %>
<%= form_for @group,
      :html => {
        :id => :group_form
      } do |f| %>
<div class="grid_12 group">
  <div class="grid_12 head alpha omega">
    <div class="grid_12 title">
      修改『<%= @group.name %>』的基本资料
    </div>  
    <% if flash[:success].present? %>
    <div id='success' class="grid_8">
      <div><%= flash[:success] %></div>
    </div>         
    <% end %>
    <div class="grid_12 line">
      <div class="grid_2">名称</div>
      <div class="grid_9">
        <%= f.text_field :name %>
      </div>
    </div>    
    <div class="grid_12 line">
      <div class="grid_2">组员</div>
      <div class="grid_9">
      <% User.active.each do |user| %>
        <div class='user grid_7'>
        <%= check_box_tag "group[user_ids][]", user.id, @group.users.include?(user) , :class => "no", :id => "user_#{user.id}" %> <%= label_tag "user_#{user.id}" ,user.full_name %>
        </div>
      <% end %>
      </div>
    </div>
  </div>
  <div class="grid_12 alpha body">  
    <div class="grid_12 line">
      <div class="grid_2">备注</div>
      <div class="grid_9">
        <%= f.label :remark, '添加备注描述', :id => :label_for_group_remark, :class => @group.remark.blank? ? '' : :hidden %>
        <%= f.text_area :remark %>
        <%= label_js_for :group_remark %>
      </div>
    </div> 
  </div>  
  <div class="grid_12 bottom">
    <div class="grid_10">
      <%= f.submit "更新该分组的基本资料" %><small>或</small><%= link_to "返回", groups_url   %>
    </div>
  </div>  
</div>
<% end %>